using FytSoa.Domain.Core.Result;
using System.Threading.Tasks;
using FytSoa.Domain.Core.Param;

namespace FytSoa.Application.Cms;

/// <summary>
/// 文章表 服务接口
/// </summary>
public interface ICmsArticleService:IApplicationService
{
    /// <summary>
    /// 查询所有——分页
    /// </summary>
    /// <returns></returns>
    Task<ApiResult<PageResult<CmsArticleDto>>> GetPagesAsync (CmsArticleParam param);
    
    /// <summary>
    /// 根据主键查询
    /// </summary>
    /// <returns></returns>
    Task<ApiResult<CmsArticleDto>> GetAsync (long id);

    /// <summary>
    /// 添加
    /// </summary>
    /// <returns></returns>
    Task<ApiResult<bool>> AddAsync (CmsArticleDto model);

    /// <summary>
    /// 修改
    /// </summary>
    /// <returns></returns>
    Task<ApiResult<bool>> ModifyAsync (CmsArticleDto model);

    /// <summary>
    /// 删除-支持多个删除，逗号分隔
    /// </summary>
    /// <returns></returns>
    Task<ApiResult<bool>> DeleteAsync (string ids);
    
    /// <summary>
    /// 添加到回收站
    /// </summary>
    /// <returns></returns>
    Task<ApiResult<bool>> UpdateRecycleAsync (List<long> ids);
    
    /// <summary>
    /// 回收站恢复
    /// </summary>
    /// <returns></returns>
    Task<ApiResult<bool>> UpdateRecoveryAsync (List<long> ids);
}

